<template><router-view v-if="isRouterAlive" /></template>

<script setup lang="ts">
import { ref, nextTick, provide } from 'vue'

const isRouterAlive = ref(true)

// 控制局部页面的重新加载
const reload = () => {
  isRouterAlive.value = false
  nextTick(() => {
    isRouterAlive.value = true
  })
}
provide('reload', reload)
</script>

<style scoped></style>
